package com.xz.coursearrange.entity.request;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @Descripe: 封装用户(管理员，讲师)登录请求体
 */
@Data
public class UserLoginRequest implements Serializable {

    private static final long serialVersionUID = -5508597805308310771L;
    @NotBlank(message = "用户名不能为空")
    @Size(min = 3, max = 20, message = "用户名长度应为3~20个字符")
    private String username;

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, max = 30, message = "密码长度应为6~30个字符")
    private String password;

    /**
     * 1管理员，2讲师
     */
//    @NotNull(message = "用户类型不能为空")
//    @Pattern(regexp = "0", message = "用户类型只能是（管理员）或（讲师）")
    private String type;

}
